Skip to content

Fix protected-main auto-release token and contracts namespaces - #366

Merged
unbraind merged 1 commit into
mainfrom
fix/auto-release-protected-branch-token
Jun 25, 2026
Merged

unbraind merged 1 commit into
mainfrom
fix/auto-release-protected-branch-token

Conversation

@unbraind

Copy link
Copy Markdown
Owner

Summary

  • Wire Auto Release checkout through RELEASE_PAT with a production push preflight so protected-main release pushes fail early with actionable guidance instead of GH006 after all gates.
  • Document release environment setup for RELEASE_PAT and improve blocked-release alert recovery text.
  • Improve pm contracts --command <namespace> UX for package command roots by returning command_namespace child-command guidance, while preserving child command flag contracts.
  • Refresh @sentry/node to 10.61.0 and regenerate CHANGELOG.md via pm-changelog 2026.6.20.

PM tracking

  • pm-y1o4 closed and released with tests/docs/evidence.
  • pm-9gxi remains blocked, not closed: code is implemented and verified, but the release environment still needs a maintainer-provided RELEASE_PAT secret.

Verification

  • node scripts/run-tests.mjs test -- tests/unit/commands/contracts-command.spec.ts tests/integration/release-automation-contract.spec.ts tests/integration/ci-workflow-contract.spec.ts (57 tests)
  • node scripts/run-tests.mjs coverage => 100/100/100/100
  • node scripts/release/static-quality-gate.mjs --json => docstrings 237/237 source, 1840/1840 exported
  • node scripts/release/run-gates.mjs --json --telemetry-mode off
  • node scripts/release/sentry-telemetry-gate.mjs --json --telemetry-mode best-effort => Sentry critical=0 high=0, telemetry finish error rate 0.78%, missing error-code rows=0
  • pnpm contracts:check
  • pnpm changelog:pm:check
  • pnpm audit --audit-level low
  • pnpm security:scan
  • Manual temp smoke in /tmp/pm-cli-manual-smoke-NS6WJB using sandboxed PM_PATH and PM_GLOBAL_PATH: init/create/claim/update/files/docs/tests/comment/list/validate/health/close/release

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @unbraind, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@unbraind

Copy link
Copy Markdown
Owner Author

@codex review

/gemini review

@gemini-code-assist

@coderabbitai full review

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

@coderabbitai

coderabbitai Bot commented Jun 25, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@unbraind, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 21 minutes. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 92f85a43-30d4-4071-a473-b7aa44a0b5af

📥 Commits

Reviewing files that changed from the base of the PR and between 5c74a30 and 735e8dc.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (14)
  • .agents/pm/history/pm-9gxi.jsonl
  • .agents/pm/history/pm-y1o4.jsonl
  • .agents/pm/issues/pm-9gxi.toon
  • .agents/pm/issues/pm-y1o4.toon
  • .github/workflows/auto-release.yml
  • CHANGELOG.md
  • docs/RELEASING.md
  • package.json
  • scripts/release/run-release-pipeline.mjs
  • src/cli/commands/contracts.ts
  • tests/integration/ci-workflow-contract.spec.ts
  • tests/integration/release-automation-contract.spec.ts
  • tests/unit/commands/contracts-command.spec.ts
  • tests/unit/scripts/release/run-release-pipeline.spec.ts
📝 Walkthrough

Walkthrough

The PR adds command_namespace handling for pm contracts --command namespace roots, updates the related regression tests and issue/changelog records, and changes the auto-release workflow and release pipeline to use RELEASE_PAT-backed push credentials with matching tests and documentation updates.

Changes

Contracts namespace recovery

Layer / File(s) Summary
Namespace recovery and regression
src/cli/commands/contracts.ts, tests/unit/commands/contracts-command.spec.ts
runContracts now detects namespace prefixes, throws command_namespace guidance, and the unit test covers namespace-root rejection plus concrete child-command lookup.
History and closure metadata
.agents/pm/history/pm-y1o4.jsonl, .agents/pm/issues/pm-y1o4.toon, CHANGELOG.md
The issue history, issue record, and changelog entry record the claim, verification, closure, and release-note metadata for the namespace-root fix.

Auto-release protected push gating

Layer / File(s) Summary
Push credential handling
scripts/release/run-release-pipeline.mjs, tests/unit/scripts/release/run-release-pipeline.spec.ts
The release pipeline reads RELEASE_PUSH_TOKEN, clears it from the environment, and applies Git extraheader credentials for the initial and retry push paths, with unit coverage for token scoping and config merging.
Workflow gate and contract updates
.github/workflows/auto-release.yml, tests/integration/ci-workflow-contract.spec.ts, tests/integration/release-automation-contract.spec.ts, package.json
The workflow disables credential persistence, exposes RELEASE_PAT_CONFIGURED and RELEASE_PUSH_TOKEN, fails fast on protected push runs without RELEASE_PAT, and the contract tests assert the updated permissions, alert text, and dependency version.
History and release guidance
.agents/pm/history/pm-9gxi.jsonl, .agents/pm/issues/pm-9gxi.toon, docs/RELEASING.md
The issue history, issue record, verification comments, and release docs capture the blocked auto-release run, the missing RELEASE_PAT condition, and the setup guidance.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • unbraind/pm-cli#99: Also changes src/cli/commands/contracts.ts error-recovery behavior for invalid --command inputs.
  • unbraind/pm-cli#285: Also changes the release pipeline push/retry flow in scripts/release/run-release-pipeline.mjs.
  • unbraind/pm-cli#364: Also changes the same auto-release.yml workflow and blocked auto-release alert path.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main changes: protected-main auto-release token handling and contracts namespace lookup fixes.
Description check ✅ Passed The description is clearly related and accurately summarizes the auto-release, contracts namespace, and release/docs updates.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai

coderabbitai Bot commented Jun 25, 2026 •

Copy link
Copy Markdown

@unbraind Re-running a full review of this PR, with attention to the protected-main auto-release/token changes and the contracts namespace UX updates.

✅ Action performed

Full review finished.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request resolves two main issues: it updates the contracts command lookup to handle package namespace roots by throwing a descriptive command_namespace error with child command suggestions, and it remediates the Auto Release pipeline block on protected branches by utilizing a RELEASE_PAT secret. Additionally, it updates @sentry/node to ^10.61.0 and documents the release requirements. Regarding the feedback, the reviewer correctly identified that nesting the new namespace root contracts test case inside an unrelated test block reduces modularity, and suggested splitting it into its own dedicated it block for better clarity.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +1873 to +1949
it("rejects unknown action and command filters", async () => {
await withTempPmPath(async (context) => {
await writeTestExtension({
root: context.pmPath,
placement: "projectRoot",
directory: "changelog-namespace-contracts",
manifest: {
name: "changelog-namespace-contracts",
version: "1.0.0",
entry: "./index.mjs",
capabilities: ["commands", "schema"],
},
entryFilename: "index.mjs",
entrySource: [
"export default {",
" activate(api) {",
" api.registerCommand({",
" name: 'changelog generate',",
" action: 'changelog-generate',",
" flags: [{ long: '--output', value_name: 'file', value_type: 'string' }],",
" run: () => ({ ok: true }),",
" });",
" api.registerCommand({",
" name: 'changelog export',",
" action: 'changelog-export',",
" flags: [{ long: '--format', value_name: 'format', value_type: 'string' }],",
" run: () => ({ ok: true }),",
" });",
" },",
"};",
"",
].join("\n"),
});

await expect(
runContracts(
{ command: "changelog", flagsOnly: true },
{ ...GLOBAL_OPTIONS, path: context.pmPath },
),
).rejects.toMatchObject<PmCliError>({
message:
'Command "changelog" is a command namespace. Choose a concrete child command: changelog export, changelog generate.',
exitCode: EXIT_CODE.USAGE,
context: expect.objectContaining({
code: "command_namespace",
required: "Use a concrete child command path listed under this namespace.",
why: expect.stringContaining("command flag contracts belong to executable child commands"),
examples: expect.arrayContaining([
'pm contracts --command "changelog export" --flags-only --json',
'pm contracts --command "changelog generate" --flags-only --json',
]),
recovery: expect.objectContaining({
suggested_retry: 'pm contracts --command "changelog export" --flags-only --json',
fallback_candidates: expect.arrayContaining([
{
source: "command_namespace",
command: 'pm contracts --command "changelog generate" --flags-only --json',
reason: "Child command under changelog",
},
]),
}),
}),
});

const childResult = await runContracts(
{ command: "changelog generate", flagsOnly: true },
{ ...GLOBAL_OPTIONS, path: context.pmPath },
);
expect(childResult.command_flags).toEqual([
expect.objectContaining({
command: "changelog generate",
provider: "extension",
flags: [expect.objectContaining({ flag: "--output" })],
}),
]);
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Nesting the new namespace root contracts test case inside the existing it("rejects unknown action and command filters") block reduces test modularity and makes test reports less clear. Splitting it into its own dedicated it block improves maintainability and ensures the test suite's output explicitly documents this specific behavior.

  it("rejects command namespace roots and suggests concrete child commands", async () => {
    await withTempPmPath(async (context) => {
      await writeTestExtension({
        root: context.pmPath,
        placement: "projectRoot",
        directory: "changelog-namespace-contracts",
        manifest: {
          name: "changelog-namespace-contracts",
          version: "1.0.0",
          entry: "./index.mjs",
          capabilities: ["commands", "schema"],
        },
        entryFilename: "index.mjs",
        entrySource: [
          "export default {",
          "  activate(api) {",
          "    api.registerCommand({",
          "      name: 'changelog generate',",
          "      action: 'changelog-generate',",
          "      flags: [{ long: '--output', value_name: 'file', value_type: 'string' }],",
          "      run: () => ({ ok: true }),",
          "    });",
          "    api.registerCommand({",
          "      name: 'changelog export',",
          "      action: 'changelog-export',",
          "      flags: [{ long: '--format', value_name: 'format', value_type: 'string' }],",
          "      run: () => ({ ok: true }),",
          "    });",
          "  },",
          "};",
          "",
        ].join("\n"),
      });

      await expect(
        runContracts(
          { command: "changelog", flagsOnly: true },
          { ...GLOBAL_OPTIONS, path: context.pmPath },
        ),
      ).rejects.toMatchObject<PmCliError>({
        message:
          'Command "changelog" is a command namespace. Choose a concrete child command: changelog export, changelog generate.',
        exitCode: EXIT_CODE.USAGE,
        context: expect.objectContaining({
          code: "command_namespace",
          required: "Use a concrete child command path listed under this namespace.",
          why: expect.stringContaining("command flag contracts belong to executable child commands"),
          examples: expect.arrayContaining([
            'pm contracts --command "changelog export" --flags-only --json',
            'pm contracts --command "changelog generate" --flags-only --json',
          ]),
          recovery: expect.objectContaining({
            suggested_retry: 'pm contracts --command "changelog export" --flags-only --json',
            fallback_candidates: expect.arrayContaining([
              {
                source: "command_namespace",
                command: 'pm contracts --command "changelog generate" --flags-only --json',
                reason: "Child command under changelog",
              },
            ]),
          }),
        }),
      });

      const childResult = await runContracts(
        { command: "changelog generate", flagsOnly: true },
        { ...GLOBAL_OPTIONS, path: context.pmPath },
      );
      expect(childResult.command_flags).toEqual([
        expect.objectContaining({
          command: "changelog generate",
          provider: "extension",
          flags: [expect.objectContaining({ flag: "--output" })],
        }),
      ]);
    });
  });

  it("rejects unknown action and command filters", async () => {

@gemini-code-assist

Copy link
Copy Markdown

I have reviewed the changes regarding the RELEASE_PAT integration for protected-main auto-releases and the UX improvements for command namespaces in src/cli/commands/contracts.ts. The implementation appears robust, particularly the fail-fast preflight checks and the clear guidance provided for namespace roots. I am monitoring the progress of the automated review and am available if you have specific questions or require further analysis on these changes.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/auto-release.yml (1)

54-63: 🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift

Elevated RELEASE_PAT is persisted to the runner's git config for all later steps.

actions/checkout defaults to persist-credentials: true, so the maintainer RELEASE_PAT (which carries contents:write + branch-protection bypass) is written into .git/config and remains readable by every subsequent step in the job — including pnpm install --frozen-lockfile (line 98), which can execute dependency lifecycle/build scripts. A compromised or malicious transitive dependency could exfiltrate this high-privilege token.

Note that the naive fix (persist-credentials: false) is not viable here because run-release-pipeline.mjs relies on the persisted credentials to push the version commit/tag to main. A scoped approach — e.g. checking out with persist-credentials: false and injecting the PAT only into the push step (via a per-step extraheader/remote URL) — would limit the exposure window to the push instead of the whole job. Please confirm the current exposure is acceptable given the token's bypass rights.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/auto-release.yml around lines 54 - 63, The Checkout step
is persisting the high-privilege RELEASE_PAT into git credentials for the entire
job, exposing it to later steps like dependency installs. Update the workflow so
actions/checkout does not keep credentials globally, and instead scope the
maintainer token only to the release push path used by run-release-pipeline.mjs,
such as injecting it just for the version/tag push step or equivalent per-step
remote auth. Keep the fix localized to the Checkout and push flow so the token
is only available when needed.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In @.github/workflows/auto-release.yml:
- Around line 54-63: The Checkout step is persisting the high-privilege
RELEASE_PAT into git credentials for the entire job, exposing it to later steps
like dependency installs. Update the workflow so actions/checkout does not keep
credentials globally, and instead scope the maintainer token only to the release
push path used by run-release-pipeline.mjs, such as injecting it just for the
version/tag push step or equivalent per-step remote auth. Keep the fix localized
to the Checkout and push flow so the token is only available when needed.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 3b1ae1bf-c9d2-4f02-b785-813821c43145

📥 Commits

Reviewing files that changed from the base of the PR and between 5c74a30 and 9abe50a.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (12)
  • .agents/pm/history/pm-9gxi.jsonl
  • .agents/pm/history/pm-y1o4.jsonl
  • .agents/pm/issues/pm-9gxi.toon
  • .agents/pm/issues/pm-y1o4.toon
  • .github/workflows/auto-release.yml
  • CHANGELOG.md
  • docs/RELEASING.md
  • package.json
  • src/cli/commands/contracts.ts
  • tests/integration/ci-workflow-contract.spec.ts
  • tests/integration/release-automation-contract.spec.ts
  • tests/unit/commands/contracts-command.spec.ts

@unbraind
unbraind force-pushed the fix/auto-release-protected-branch-token branch from 9abe50a to 5142e7a Compare June 25, 2026 12:05
@unbraind

Copy link
Copy Markdown
Owner Author

Review feedback addressed in 5142e7a: split the package namespace-root contracts regression into its own dedicated test case and reran

@unbrained/pm-cli@2026.6.24 build /home/steve/GITHUB_RELEASE/pm-cli
node scripts/prepare-build-cache.mjs && tsc -p tsconfig.json && node scripts/bundle-cli.mjs && node scripts/finalize-build.mjs

RUN v4.1.9 /home/steve/GITHUB_RELEASE/pm-cli

Test Files 1 passed (1)
Tests 37 passed (37)
Start at 14:06:01
Duration 1.99s (transform 573ms, setup 0ms, import 674ms, tests 1.17s, environment 0ms) (37 tests).

@codex review

/gemini review

@gemini-code-assist

@coderabbitai full review

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

@coderabbitai

coderabbitai Bot commented Jun 25, 2026 •

Copy link
Copy Markdown

@unbraind Thanks for the update — noted the regression coverage was split into its own dedicated test case in 5142e7a7, and the targeted build/test rerun passed. I’m kicking off a fresh full review with attention to that change and the rest of the PR surface.


If you found this review helpful, would you consider giving us a shout-out on X?

Thank you for using CodeRabbit!

✅ Action performed

Full review finished.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the auto-release workflow to use a maintainer RELEASE_PAT to bypass branch protection rules on main when pushing version-bump commits, adding a fail-fast preflight check and updating relevant documentation and integration tests. It also updates @sentry/node to ^10.61.0. Additionally, it resolves an issue where looking up package namespace roots in the contracts command returned an unknown command error; it now throws a specific command_namespace error suggesting concrete child commands, backed by new unit tests. Review feedback suggests consolidating duplicate test assertions for the auto-release.yml workflow across release-automation-contract.spec.ts and ci-workflow-contract.spec.ts to improve maintainability.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +69 to +76
expect(workflow).toContain("token: ${{ secrets.RELEASE_PAT || github.token }}");
expect(workflow).toContain("RELEASE_PAT_CONFIGURED: ${{ secrets.RELEASE_PAT != '' }}");
expect(workflow).toContain("RELEASE_PAT is required before Auto Release can push");
expect(workflow).toContain("gh workflow run release.yml --ref main -f tag=\"${NEW_TAG}\"");
expect(workflow).toContain("gh run watch \"${RELEASE_RUN_ID}\" --compact --exit-status --interval 30");
expect(workflow).toContain("SENTRY_AUTH_TOKEN");
expect(workflow).toContain("SENTRY_PERSONAL_ADMIN_TOKEN");
expect(workflow).toContain("Common causes:");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There appears to be some test duplication for the auto-release.yml workflow. This file and tests/integration/ci-workflow-contract.spec.ts both contain a test case that reads and asserts on the contents of auto-release.yml.

Specifically, the test it("keeps auto-release workflow aligned with one-per-day and manual override controls", ...) in this file and it("keeps auto-release workflow aligned with one-per-day and manual override policy", ...) in ci-workflow-contract.spec.ts seem to have overlapping responsibilities.

To improve maintainability and avoid needing to update two places for a single workflow change, consider consolidating these tests into a single, comprehensive test case for auto-release.yml in one of the files.

@unbraind
unbraind force-pushed the fix/auto-release-protected-branch-token branch from 5142e7a to 876541c Compare June 25, 2026 12:27
@unbraind

Copy link
Copy Markdown
Owner Author

Review loop restarted for current head 876541c.

Changes since the prior review:

  • Scoped RELEASE_PAT fallback into RELEASE_PUSH_TOKEN only for git push via in-memory extraheader; checkout now uses persist-credentials: false and no privileged checkout token.
  • Added unit coverage proving RELEASE_PUSH_TOKEN is removed from process.env and not inherited by child commands except git push.
  • Consolidated duplicated auto-release workflow contract assertions into the CI workflow contract test.
  • Kept pm-9gxi blocked on the external RELEASE_PAT secret being absent, with implementation/docs/tests ready once configured.

Local verification on this head:

  • node scripts/run-tests.mjs test -- tests/unit/scripts/release/run-release-pipeline.spec.ts tests/integration/ci-workflow-contract.spec.ts tests/integration/release-automation-contract.spec.ts tests/unit/commands/contracts-command.spec.ts
  • node scripts/run-tests.mjs coverage => 100/100/100/100
  • node scripts/release/static-quality-gate.mjs --json => docstrings 100%
  • pnpm contracts:check
  • pm health --check-only --summary --json
  • git diff --check

@codex review
/gemini review
@gemini-code-assist
@coderabbitai full review

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

@coderabbitai

coderabbitai Bot commented Jun 25, 2026 •

Copy link
Copy Markdown

@unbraind Thanks for the detailed update. I’ve noted the current-head changes around RELEASE_PUSH_TOKEN scoping, the non-privileged checkout setup, the added env-isolation coverage, and the consolidated workflow contract assertions.

Re-running a full review for the current head 876541c1, with attention to those release-token handling changes and the remaining externally blocked RELEASE_PAT setup.


✏️ Learnings added
Learnt from: unbraind
URL: https://github.com/unbraind/pm-cli/pull/366

Timestamp: 2026-06-25T12:27:42.130Z
Learning: In the `pm-cli` auto-release implementation for pull request `#366`, privileged release credentials are intentionally scoped to `git push` via `RELEASE_PUSH_TOKEN` rather than checkout credentials; `.github/workflows/auto-release.yml` uses `persist-credentials: false`, and `tests/unit/scripts/release/run-release-pipeline.spec.ts` verifies that `RELEASE_PUSH_TOKEN` is removed from `process.env` and is not inherited by child commands except the `git push` path.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

✅ Action performed

Full review finished.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request addresses two main issues: it resolves a protected-branch push block in the Auto Release pipeline by scoping and injecting a maintainer RELEASE_PAT via a Git extraheader, and it improves the contracts command to handle package namespace roots by throwing a descriptive error and suggesting concrete child commands. Additionally, @sentry/node is updated to 10.61.0, and duplicate workflow assertions are cleaned up. The review feedback suggests standardizing the HTTP header and authentication scheme casing to Authorization: Basic in both the release pipeline script and its corresponding unit tests to ensure maximum compatibility.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

if (!token) {
return gitOptions;
}
const authHeader = `AUTHORIZATION: basic ${Buffer.from(`x-access-token:${token}`, "utf8").toString("base64")}`;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Standardizing the HTTP header name and authentication scheme casing to Authorization: Basic is highly recommended. While HTTP headers and auth schemes are technically case-insensitive per RFC 7235, some strict proxies, firewalls, or older Git/curl builds may fail to parse non-standard casing like AUTHORIZATION: basic. Using the standard casing ensures maximum compatibility across all network environments.

Suggested change
const authHeader = `AUTHORIZATION: basic ${Buffer.from(`x-access-token:${token}`, "utf8").toString("base64")}`;
const authHeader = `Authorization: Basic ${Buffer.from(`x-access-token:${token}`, "utf8").toString("base64")}`;

Comment on lines +483 to +486
const expectedHeader = `AUTHORIZATION: basic ${Buffer.from(
"x-access-token:release-token",
"utf8",
).toString("base64")}`;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Update the test assertion to match the standardized Authorization: Basic header casing.

Suggested change
const expectedHeader = `AUTHORIZATION: basic ${Buffer.from(
"x-access-token:release-token",
"utf8",
).toString("base64")}`;
const expectedHeader = `Authorization: Basic ${Buffer.from(
"x-access-token:release-token",
"utf8",
).toString("base64")}`;

@unbraind
unbraind force-pushed the fix/auto-release-protected-branch-token branch from 876541c to 960a21b Compare June 25, 2026 12:39
@unbraind

Copy link
Copy Markdown
Owner Author

Review loop restarted for current head 960a21b.

Fresh change after Gemini feedback:

  • Standardized the temporary git push extraheader casing to Authorization: Basic ... in withReleasePushCredentials.
  • Updated the release-pipeline unit assertion to match.

Local verification on this head:

  • node scripts/run-tests.mjs test -- tests/unit/scripts/release/run-release-pipeline.spec.ts => 33 tests passed
  • node scripts/run-tests.mjs coverage => 100/100/100/100, 5097 tests passed
  • node scripts/release/static-quality-gate.mjs --json => source docstrings 237/237 and exported docstrings 1840/1840
  • pnpm contracts:check
  • changelog generate --check => unchanged
  • pm health --check-only --summary --json
  • git diff --check

@codex review
/gemini review
@gemini-code-assist
@coderabbitai full review

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

@coderabbitai

coderabbitai Bot commented Jun 25, 2026 •

Copy link
Copy Markdown

@unbraind Thanks — noted the current head 960a21b7, the withReleasePushCredentials update to standardize the temporary git-push extraheader as Authorization: Basic ..., the matching unit assertion change, and the local verification pass set you listed.

I’m re-running a full review now with attention to that release-push credential handling update and the surrounding release/contracts coverage.


✏️ Learnings added
Learnt from: unbraind
URL: https://github.com/unbraind/pm-cli/pull/366

Timestamp: 2026-06-25T12:39:40.395Z
Learning: In pull request `#366` of `unbraind/pm-cli`, the release credential helper `withReleasePushCredentials` standardizes the temporary git push extraheader casing to `Authorization: Basic ...`, and `tests/unit/scripts/release/run-release-pipeline.spec.ts` was updated to assert that exact header format.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

✅ Action performed

Full review finished.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces scoped git push authentication using a maintainer RELEASE_PAT to prevent Auto Release blockages on protected branches, alongside corresponding workflow, script, test, and documentation updates. Additionally, it enhances the contracts command to gracefully handle package namespace roots by suggesting concrete child commands instead of throwing an unknown command error. Feedback is provided to dynamically append Git configuration variables in withReleasePushCredentials to avoid overwriting existing environment configurations.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +216 to +230
export function withReleasePushCredentials(gitOptions = {}, token = releasePushToken) {
if (!token) {
return gitOptions;
}
const authHeader = `Authorization: Basic ${Buffer.from(`x-access-token:${token}`, "utf8").toString("base64")}`;
return {
...gitOptions,
env: {
...(gitOptions.env ?? {}),
GIT_CONFIG_COUNT: "1",
GIT_CONFIG_KEY_0: "http.https://github.com/.extraheader",
GIT_CONFIG_VALUE_0: authHeader,
},
};
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Hardcoding GIT_CONFIG_COUNT: "1" and GIT_CONFIG_KEY_0 / GIT_CONFIG_VALUE_0 can silently overwrite or discard any existing Git configuration variables passed in gitOptions.env.

To make this robust and prevent potential configuration conflicts or loss in future refactorings, dynamically read the existing GIT_CONFIG_COUNT (if any) and append the new authorization header config at the next available index.

Suggested change
export function withReleasePushCredentials(gitOptions = {}, token = releasePushToken) {
if (!token) {
return gitOptions;
}
const authHeader = `Authorization: Basic ${Buffer.from(`x-access-token:${token}`, "utf8").toString("base64")}`;
return {
...gitOptions,
env: {
...(gitOptions.env ?? {}),
GIT_CONFIG_COUNT: "1",
GIT_CONFIG_KEY_0: "http.https://github.com/.extraheader",
GIT_CONFIG_VALUE_0: authHeader,
},
};
}
export function withReleasePushCredentials(gitOptions = {}, token = releasePushToken) {
if (!token) {
return gitOptions;
}
const authHeader = 'Authorization: Basic ' + Buffer.from('x-access-token:' + token, 'utf8').toString('base64');
const env = { ...(gitOptions.env ?? {}) };
const count = parseInt(env.GIT_CONFIG_COUNT ?? '0', 10);
env['GIT_CONFIG_KEY_' + count] = 'http.https://github.com/.extraheader';
env['GIT_CONFIG_VALUE_' + count] = authHeader;
env.GIT_CONFIG_COUNT = String(count + 1);
return {
...gitOptions,
env,
};
}

@unbraind
unbraind force-pushed the fix/auto-release-protected-branch-token branch from 960a21b to 6f800bf Compare June 25, 2026 12:55
@unbraind

Copy link
Copy Markdown
Owner Author

Review loop restarted for current head 6f800bf.

Fresh change after Gemini feedback:

  • withReleasePushCredentials now preserves existing GIT_CONFIG_* env entries and appends the release auth extraheader at the next Git config index.
  • Unit coverage now exercises empty, malformed, and pre-existing Git config env cases while keeping RELEASE_PUSH_TOKEN scoped only to git push.

Local verification on this head:

  • node scripts/run-tests.mjs test -- tests/unit/scripts/release/run-release-pipeline.spec.ts => 33 tests passed
  • node scripts/run-tests.mjs coverage => 100/100/100/100, 5097 tests passed
  • node scripts/release/static-quality-gate.mjs --json => source docstrings 237/237 and exported docstrings 1840/1840
  • pnpm contracts:check
  • changelog generate --check => unchanged
  • pm health --check-only --summary --json
  • git diff --check

@codex review
/gemini review
@gemini-code-assist
@coderabbitai full review

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request addresses two main issues: it resolves a block in the Auto Release pipeline where the bot could not push version commits to the protected main branch, and it improves the contracts command lookup to handle package namespace roots. For the release pipeline, the workflow is updated to use a maintainer RELEASE_PAT (passed as RELEASE_PUSH_TOKEN), which is securely scoped only to the git push process via a temporary Git extraheader and deleted from process.env to prevent inheritance by child processes. For the contracts command, looking up a namespace root (e.g., changelog) now throws a clear command_namespace error suggesting concrete executable child commands instead of an unknown_command error. Additionally, @sentry/node has been updated to ^10.61.0 along with other lockfile dependencies, and comprehensive integration and unit tests have been added to verify these changes. No reviewer comments were provided, so there is no additional feedback to address.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@coderabbitai

coderabbitai Bot commented Jun 25, 2026 •

Copy link
Copy Markdown

@unbraind Thanks — noted the current head 6f800bf1, the withReleasePushCredentials update to preserve existing GIT_CONFIG_* entries while appending the release auth extraheader at the next config index, and the added unit coverage for empty, malformed, and pre-existing Git config env cases. I’ve also noted the local verification pass set you listed.

Re-running a full review now with attention to that Git config env handling change and the surrounding release-token isolation behavior.


✏️ Learnings added
Learnt from: unbraind
URL: https://github.com/unbraind/pm-cli/pull/366

Timestamp: 2026-06-25T12:58:06.827Z
Learning: In pull request `#366` of `unbraind/pm-cli`, the release helper `withReleasePushCredentials` preserves any existing `GIT_CONFIG_*` environment entries and appends the temporary release auth extraheader at the next available Git config index; `tests/unit/scripts/release/run-release-pipeline.spec.ts` covers empty, malformed, and pre-existing Git config env cases while keeping `RELEASE_PUSH_TOKEN` scoped only to `git push`.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

✅ Action performed

Full review finished.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/auto-release.yml (1)

113-128: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Validate the same token value the release script will use.

Line 124 only checks RELEASE_PAT_CONFIGURED, but run-release-pipeline.mjs trims RELEASE_PUSH_TOKEN and skips credential injection when it becomes empty. A whitespace-only RELEASE_PAT can pass this preflight, then fail later at git push without the actionable guard.

Proposed guard alignment
-          if [[ "${INPUT_PUSH}" == "true" && "${INPUT_DRY_RUN}" != "true" && "${RELEASE_PAT_CONFIGURED}" != "true" ]]; then
+          if [[ "${INPUT_PUSH}" == "true" && "${INPUT_DRY_RUN}" != "true" && ( "${RELEASE_PAT_CONFIGURED}" != "true" || -z "${RELEASE_PUSH_TOKEN//[[:space:]]/}" ) ]]; then
             echo "RELEASE_PAT is required before Auto Release can push the checked version commit/tag to protected main."
             echo "Create a release environment secret from a maintainer token with contents:write and branch-protection bypass rights."
             exit 1
           fi
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/auto-release.yml around lines 113 - 128, The preflight
check in the auto-release workflow is validating only RELEASE_PAT_CONFIGURED,
but the release pipeline uses RELEASE_PUSH_TOKEN after trimming, so
whitespace-only or empty tokens can still slip through and fail later. Update
the guard in the workflow run step to validate the same effective token value
that run-release-pipeline.mjs will use, and reject any blank/trimmed-empty
RELEASE_PAT before allowing push=true. Keep the existing INPUT_PUSH and
INPUT_DRY_RUN logic, but align the token presence check with RELEASE_PUSH_TOKEN
so the early failure matches the later credential injection behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In @.github/workflows/auto-release.yml:
- Around line 113-128: The preflight check in the auto-release workflow is
validating only RELEASE_PAT_CONFIGURED, but the release pipeline uses
RELEASE_PUSH_TOKEN after trimming, so whitespace-only or empty tokens can still
slip through and fail later. Update the guard in the workflow run step to
validate the same effective token value that run-release-pipeline.mjs will use,
and reject any blank/trimmed-empty RELEASE_PAT before allowing push=true. Keep
the existing INPUT_PUSH and INPUT_DRY_RUN logic, but align the token presence
check with RELEASE_PUSH_TOKEN so the early failure matches the later credential
injection behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 6f2dda70-55b4-4b84-b75c-961446d0bd79

📥 Commits

Reviewing files that changed from the base of the PR and between 9abe50a and 6f800bf.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (14)
  • .agents/pm/history/pm-9gxi.jsonl
  • .agents/pm/history/pm-y1o4.jsonl
  • .agents/pm/issues/pm-9gxi.toon
  • .agents/pm/issues/pm-y1o4.toon
  • .github/workflows/auto-release.yml
  • CHANGELOG.md
  • docs/RELEASING.md
  • package.json
  • scripts/release/run-release-pipeline.mjs
  • src/cli/commands/contracts.ts
  • tests/integration/ci-workflow-contract.spec.ts
  • tests/integration/release-automation-contract.spec.ts
  • tests/unit/commands/contracts-command.spec.ts
  • tests/unit/scripts/release/run-release-pipeline.spec.ts
💤 Files with no reviewable changes (1)
  • tests/integration/release-automation-contract.spec.ts

@unbraind
unbraind force-pushed the fix/auto-release-protected-branch-token branch from 6f800bf to ae27a82 Compare June 25, 2026 13:09
@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

@unbraind Thanks — noted current head da716201, the new bounds on contracts namespace-root recovery output (<=10 displayed child commands, <=20 fallback candidates), and the added 25-child regression covering both the bounded message and fallback payload.

Re-running a full review now with attention to that large-extension namespace-root behavior and the surrounding contracts UX/tests.

[full_review]


✏️ Learnings added
Learnt from: unbraind
URL: https://github.com/unbraind/pm-cli/pull/366

Timestamp: 2026-06-25T13:24:03.436Z
Learning: In pull request `#366` of `unbraind/pm-cli`, the contracts namespace-root recovery path was refined to cap user-facing output for large extension command groups: namespace-root errors display at most 10 child commands and return at most 20 fallback candidates, with regression coverage in `tests/unit/commands/contracts-command.spec.ts` using a 25-child extension fixture.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request secures the auto-release pipeline by scoping the RELEASE_PUSH_TOKEN strictly to git push operations via a temporary git extraheader, and updates @sentry/node to 10.61.0. It also enhances the contracts command to gracefully handle package namespace roots by returning token-efficient, capped child command suggestions instead of an unknown command error. Feedback on the changes suggests adding a defensive check in withReleasePushCredentials to handle cases where gitOptions is explicitly passed as null.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +216 to +235
export function withReleasePushCredentials(gitOptions = {}, token = releasePushToken) {
if (!token) {
return gitOptions;
}
const baseEnv = gitOptions.env ?? {};
const existingGitConfigCount = Number.parseInt(baseEnv.GIT_CONFIG_COUNT ?? "0", 10);
const gitConfigIndex = Number.isInteger(existingGitConfigCount) && existingGitConfigCount >= 0
? existingGitConfigCount
: 0;
const authHeader = `Authorization: Basic ${Buffer.from(`x-access-token:${token}`, "utf8").toString("base64")}`;
return {
...gitOptions,
env: {
...baseEnv,
GIT_CONFIG_COUNT: String(gitConfigIndex + 1),
[`GIT_CONFIG_KEY_${gitConfigIndex}`]: "http.https://github.com/.extraheader",
[`GIT_CONFIG_VALUE_${gitConfigIndex}`]: authHeader,
},
};
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To adhere to defensive programming practices, add a guard for cases where gitOptions might be explicitly passed as null. This prevents potential TypeError when accessing gitOptions.env.

export function withReleasePushCredentials(gitOptions = {}, token = releasePushToken) {
  if (!token) {
    return gitOptions;
  }
  const options = gitOptions ?? {};
  const baseEnv = options.env ?? {};
  const existingGitConfigCount = Number.parseInt(baseEnv.GIT_CONFIG_COUNT ?? "0", 10);
  const gitConfigIndex = Number.isInteger(existingGitConfigCount) && existingGitConfigCount >= 0
    ? existingGitConfigCount
    : 0;
  const authHeader = "Authorization: Basic " + Buffer.from("x-access-token:" + token, "utf8").toString("base64");
  return {
    ...options,
    env: {
      ...baseEnv,
      GIT_CONFIG_COUNT: String(gitConfigIndex + 1),
      ["GIT_CONFIG_KEY_" + gitConfigIndex]: "http.https://github.com/.extraheader",
      ["GIT_CONFIG_VALUE_" + gitConfigIndex]: authHeader,
    },
  };
}

Scope protected-main Auto Release credentials to git push by passing RELEASE_PAT as RELEASE_PUSH_TOKEN, clearing it from process.env, and injecting a temporary Git extraheader only for push attempts. Keep checkout persist-credentials=false and fail fast when production push runs lack a nonblank maintainer release token.

Improve pm contracts package namespace UX by returning token-efficient command_namespace recovery for namespace roots such as changelog while preserving executable child command flag contracts. Add regression coverage for namespace roots and bounded fallback candidates.

Refresh @sentry/node to 10.61.0, keep the generated changelog aligned through pm-changelog, and record PM evidence for pm-9gxi and pm-y1o4 including the remaining external RELEASE_PAT setup state.

Verification: focused release/contract tests, full coverage at 100/100/100/100, static/docstring gate at 100%, contracts snapshot check, pm health, changelog check, and manual temp-directory pm smoke.
@unbraind
unbraind force-pushed the fix/auto-release-protected-branch-token branch from da71620 to 735e8dc Compare June 25, 2026 13:36
@unbraind

Copy link
Copy Markdown
Owner Author

Review feedback addressed in 735e8dc.

Changes since the prior review:

  • Normalized explicit null gitOptions in withReleasePushCredentials before reading env, preserving push-only RELEASE_PUSH_TOKEN scoping and existing GIT_CONFIG_* append behavior.
  • Added unit regression coverage for null gitOptions.
  • Kept pm-9gxi blocked only on external RELEASE_PAT secret configuration; implementation/docs/tests are ready once configured.

Local verification on this head:

  • node scripts/run-tests.mjs test -- tests/unit/scripts/release/run-release-pipeline.spec.ts => 33 tests passed
  • node scripts/run-tests.mjs coverage => 100/100/100/100, 5098 tests passed
  • node scripts/release/static-quality-gate.mjs --json => source docstrings 237/237 and exported docstrings 1840/1840
  • pnpm contracts:check
  • pm health --check-only --summary --json
  • changelog generate --check => unchanged
  • git diff --check

@codex review
/gemini review
@gemini-code-assist
@coderabbitai full review

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

@coderabbitai

coderabbitai Bot commented Jun 25, 2026 •

Copy link
Copy Markdown

@unbraind Thanks — noted 735e8dc9, the withReleasePushCredentials update to normalize explicit null gitOptions before reading env, the added null-case regression coverage, and the verification pass set you listed.

I’m kicking off a fresh full review now with attention to that release-push credential edge case and the surrounding token-scoping behavior.


✏️ Learnings added
Learnt from: unbraind
URL: https://github.com/unbraind/pm-cli/pull/366

Timestamp: 2026-06-25T13:36:54.769Z
Learning: In pull request `#366` of `unbraind/pm-cli`, `scripts/release/run-release-pipeline.mjs` was updated so `withReleasePushCredentials` normalizes explicit `null` `gitOptions` before reading `env`, preserving push-only `RELEASE_PUSH_TOKEN` scoping and existing `GIT_CONFIG_*` append behavior; `tests/unit/scripts/release/run-release-pipeline.spec.ts` includes regression coverage for the null `gitOptions` case.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

✅ Action performed

Full review finished.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request addresses two main issues: it resolves a blocker in the Auto Release pipeline where the bot could not push version commits to the protected main branch, and it improves the contracts command to gracefully handle package namespace roots. The release pipeline was updated to use a scoped RELEASE_PUSH_TOKEN (configured via RELEASE_PAT) injected dynamically as a Git extraheader during push operations, ensuring credentials are not persisted or leaked to child processes. Additionally, the contracts command now detects when a namespace root is queried and provides token-efficient suggestions for concrete child commands, capped to prevent excessive payload sizes. Relevant documentation, dependency updates for @sentry/node, and comprehensive integration and unit tests were also added. No reviewer comments were provided for evaluation.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@unbraind
unbraind merged commit fad7658 into main Jun 25, 2026
15 checks passed
@unbraind
unbraind deleted the fix/auto-release-protected-branch-token branch June 25, 2026 13:45
unbraind added a commit that referenced this pull request Jun 25, 2026
Release the pm-9gxi working claim after PR #366 merged while leaving the item blocked on the external RELEASE_PAT repository secret setup.
unbraind added a commit that referenced this pull request Jun 25, 2026
Confirmed post-#366 that the release environment still lacks RELEASE_PAT, so
the scheduled auto-release fails fast until a maintainer adds the secret. The
push=false dry-run confirmed the rest of the pipeline is healthy (computes
v2026.6.25).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UXrEXbgSQDzLazicMTH2Tn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant